home *** CD-ROM | disk | FTP | other *** search
/ Champak 123 / (Vol 123) Jan 13 2011.iso / Games / japanish_fishing.swf / scripts / frame_53 / DoAction.as
Text File  |  2011-01-13  |  2KB  |  48 lines

  1. function bichibichi(i_num)
  2. {
  3.    _root.i_anmnum = _root.anmnum[i_num];
  4.    _root.i_anmflg = _root.anmflg[i_num];
  5.    _root.i_anmcnt = _root.anmcnt[i_num];
  6.    _root.i_kakudocnt = _root.kakudocnt[i_num];
  7.    _root.i_idouchi = _root.idouchi[i_num];
  8.    _root.i_xpos = _root.xpos[i_num];
  9.    _root.i_ypos = _root.ypos[i_num];
  10.    _root.i_anmcnt += 1;
  11.    if(_root.i_anmcnt >= 4)
  12.    {
  13.       _root.i_anmcnt = 0;
  14.       if(_root.i_anmflg == 0)
  15.       {
  16.          _root.i_anmflg = 1;
  17.          eval("_root..kingyo_anm" + i_num).gotoAndStop("kingyo" + _root.i_anmnum + "_1");
  18.       }
  19.       else
  20.       {
  21.          _root.i_anmflg = 0;
  22.          eval("_root..kingyo_anm" + i_num).gotoAndStop("kingyo" + _root.i_anmnum + "_2");
  23.       }
  24.    }
  25.    _root.i_kakudocnt -= 1;
  26.    if(0 >= _root.i_kakudocnt)
  27.    {
  28.       _root.i_kakudocnt = 2;
  29.       _root.i_kakudo += 120;
  30.       radian = 0.017453292519943295 * (180 - _root.i_kakudo);
  31.       _root.i_xpos = Math.sin(radian);
  32.       _root.i_xpos *= 4;
  33.       _root.i_ypos = Math.cos(radian);
  34.       _root.i_ypos *= 4;
  35.       eval("_root..kingyo_anm" + i_num)._rotation = _root.i_kakudo;
  36.    }
  37.    xx = random(8) - 4;
  38.    yy = random(8) - 4;
  39.    eval("_root..kingyo_anm" + i_num)._x += xx;
  40.    eval("_root..kingyo_anm" + i_num)._y += yy;
  41.    _root.anmflg[i_num] = _root.i_anmflg;
  42.    _root.anmcnt[i_num] = _root.i_anmcnt;
  43.    _root.kakudocnt[i_num] = _root.i_kakudocnt;
  44.    _root.idouchi[i_num] = _root.i_idouchi;
  45.    _root.xpos[i_num] = _root.i_xpos;
  46.    _root.ypos[i_num] = _root.i_ypos;
  47. }
  48.